package com.doraro.platform.module.user.model.vo;

import com.doraro.platform.common.beans.Convert;
import com.doraro.platform.common.beans.params.ValidateGroups;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 前端用户信息
 *
 * @author doraro
 */
@Data
public class SysUserParam extends Convert {
    @NotBlank(message = "用户名不能为空", groups = {ValidateGroups.Create.class, Login.class})
    @ApiModelProperty(value = "用户登陆账号")
    private String loginName;
    @NotBlank(message = "密码不能为空", groups = {ValidateGroups.Create.class, Login.class})
    @ApiModelProperty(value = "用户登陆密码")
    private String password;
    @NotBlank(message = "验证码不能为空", groups = {ValidateGroups.Create.class, Login.class})
    private String captcha;
    private String uuid;
    @NotNull(message = "类型不能为空", groups = {ValidateGroups.Create.class})
    @ApiModelProperty(value = "用户角色id")
    private Integer roleId;
    @NotBlank(message = "邮箱不能为空", groups = {ValidateGroups.Create.class})
    @Email(message = "邮箱不合法", groups = {ValidateGroups.Create.class})
    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @NotBlank(message = "账号名不能为空", groups = {ValidateGroups.Create.class})
    @ApiModelProperty(value = "用户个人信息名字")
    private String nickName;

    public interface Login {

    }
}
